package com.liuguang.testassert.security;

import org.springframework.security.access.AccessDecisionManager;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.web.access.intercept.FilterInvocationSecurityMetadataSource;
import org.springframework.security.web.access.intercept.FilterSecurityInterceptor;

/**
 * @ClassName: MyFilterIntercepter
 * @Description：
 * @Author: wanghr
 * Date: 7:23 PM 2020/6/1
 * Version: 1.0
 */

public class MyFilterIntercepter extends FilterSecurityInterceptor {
    public MyFilterIntercepter(FilterInvocationSecurityMetadataSource filterInvocationSecurityMetadataSource,
                               AccessDecisionManager accessDecisionManager, AuthenticationManager authenticationManager) {
        this.setSecurityMetadataSource(filterInvocationSecurityMetadataSource);
        this.setAccessDecisionManager(accessDecisionManager);
        this.setAuthenticationManager(authenticationManager);

    }
    public MyFilterIntercepter(AccessDecisionManager accessDecisionManager, AuthenticationManager authenticationManager) {
        this.setAccessDecisionManager(accessDecisionManager);
        this.setAuthenticationManager(authenticationManager);
    }

}
